home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
pdoxde
/
pxtest.bas
< prev
next >
Wrap
BASIC Source File
|
1995-05-09
|
11KB
|
196 lines
' pxengine.gbl
' written by J.W.Jaster 1991
Global Const MBOK = 1
Global Const TRUE = 1
Global Const FALSE = 0
Global Const DBPATH = "g:\vb\"
Global rc As Integer
Global aValue As String * 255
Global aSize As Integer
Global sValue As Integer
Global lValue As Long
Global dValue As Double
Global nFlds As Integer
Global tIndex As Integer
Global fldname As String * 255
Global returnFld As String * 255
Global mm As Integer
Global yy As Integer
Global dd As Integer
Global filespec As String
Global Const PXDEFAULT = 0 ' use internal default value
Global Const MAXTABLEHANDLES = 64 ' maximum number of open
Global Const DEFTABLEHANDLES = 5 ' default number of open
' tables allowed at a time
Global Const MAXRECORDHANDLES = 128 ' maximum number of record
' buffers available
Global Const DEFRECORDHANDLES = 10 ' default number of record
' buffers available
Global Const MAXLOCKHANDLES = 128 ' maximum number of lock
' handles per table
Global Const DEFLOCKHANDLES = 32 ' default number of lock
' handles per table
Global Const MAXFILEHANDLES = 255 ' maximum number of DOS file
' handles to use
Global Const MINFILEHANDLES = 2 ' minimum number of DOS file
' handles to use
Global Const DEFFILEHANDLES = 10 ' default number of DOS file
' handles to use
' Swap buffer size
Global Const MAXSWAPSIZE = 256 ' maximum buffer size allowed (k)
Global Const MINSWAPSIZE = 8 ' minimum buffer size allowed (k)
Global Const DEFSWAPSIZE = 32 ' default buffer size (k)
' Network codes
' used in PXNetInit
Global Const NOTONNET = 1 ' not on a net
Global Const NOVELLNET = 2 ' Novell
Global Const THREECOMNET = 3 ' 3Com
Global Const THREEOPENNET = 4 ' 3Com 3+Open
Global Const OTHERNET = 5 ' other: unknown DOS 3.1 compatible
Global Const STARLANNET = 7 ' Starlan
Global Const BANYANNET = 8 ' Banyan
Global Const IBMPCNET = 9 ' IBM PC
Global Const LOCALSHARE = 32 ' enables sharing on local drives with
' any net type
' (i.e. OTHERNET | LOCALSHARE)
Global Const DEFUSERNAME = "" ' use default username in PXNetInit()
' used in PXKeyAdd
Global Const PRIMARY = 0 ' primary index (key)
Global Const SECONDARY = 1 ' not maintained secondary index
Global Const INCSECONDARY = 2 ' maintained secondary index
' used in PXSrchFld, PXSrchKey
Global Const SEARCHFIRST = 0 ' search from beginning of table
Global Const SEARCHNEXT = 1 ' search from next record in table
Global Const CLOSESTRECORD = 2 ' (modifier) goto 'nearest' record if
' no match found (ordered fields only)
' Lock types
' used in PXNetFileLock, PXNetFileUnlock, PXNetTblLock, PXNetTblUnlock
Global Const FL = 1 ' full lock, no concurrency
Global Const WL = 2 ' write lock
Global Const PWL = 3 ' prevent write lock
Global Const PFL = 4 ' prevent full lock, full concurrency
' macros for checking blank values
Global Const BLANKDATE = &H80000000
Global Const BLANKLONG = &H80000000
Global Const BLANKSHORT = &H8000
' successful Engine function operation returns
Global Const PXSUCCESS = 0
' errorcodes from Engine functions
' initialization errors
Global Const PXERR_NOTINITERR = 78 ' Engine not initialized
Global Const PXERR_ALREADYINIT = 82 ' Engine already initialized
Global Const PXERR_NOTLOGGEDIN = 98 ' Could not login on network
' (to PARADOX.NET)
Global Const PXERR_NONETINIT = 107 ' Engine not initialized
' with PXNetInit
Global Const PXERR_NETMULTIPLE = 15 ' multiple PARADOX.NET files
Global Const PXERR_CANTSHAREPDOXNET = 134 ' can't lock PARADOX.NET -- is
' SHARE.EXE loaded?
Global Const PXERR_WINDOWSREALMODE = 135 ' can't run Engine in Windows
' real mode
' hardware related errors
Global Const PXERR_DRIVENOTREADY = 1 ' Drive not ready
Global Const PXERR_DISKWRITEPRO = 124 ' Disk is write protected
Global Const PXERR_GENERALFAILURE = 126 ' General hardware error
' directory reg error codes
Global Const PXERR_DIRNOTFOUND = 2 ' Directory not found
Global Const PXERR_DIRBUSY = 10 ' Sharing violation
Global Const PXERR_DIRLOCKED = 11 ' Sharing violation
Global Const PXERR_DIRNOACCESS = 12 ' No access to directory
Global Const PXERR_DIRNOTPRIVATE = 14 ' Single user, but directory is
' shared
' file oriented errors
Global Const PXERR_FILEBUSY = 3 ' File is busy
Global Const PXERR_FILELOCKED = 4 ' File is locked
Global Const PXERR_FILENOTFOUND = 5 ' Could not find file
' table oriented errors
Global Const PXERR_TABLEBUSY = 118 ' Table is busy
Global Const PXERR_TABLELOCKED = 119 ' Table is locked
Global Const PXERR_TABLENOTFOUND = 120 ' Table was not found
Global Const PXERR_TABLEOPEN = 83 ' Unable to perform operation
' on open table
Global Const PXERR_TABLEINDEXED = 94 ' Table is indexed
Global Const PXERR_TABLENOTINDEXED = 95 ' Table is not indexed
Global Const PXERR_TABLEEMPTY = 105 ' Operation on empty table
Global Const PXERR_TABLEWRITEPRO = 22 ' Table is write protected
Global Const PXERR_TABLECORRUPTED = 6 ' Table is corrupted
Global Const PXERR_TABLEFULL = 128 ' Table is full
Global Const PXERR_TABLESQL = 130 ' Table is SQL replica
Global Const PXERR_INSUFRIGHTS = 21 ' Insufficient password rights
' index oriented errors
Global Const PXERR_XCORRUPTED = 7 ' Primary index is corrupted
Global Const PXERR_XOUTOFDATE = 8 ' Primary index is out of date
Global Const PXERR_XSORTVERSION = 13 ' Sort for index different
' from table
Global Const PXERR_SXCORRUPTED = 122 ' Secondary index is corrupted
Global Const PXERR_SXOUTOFDATE = 96 ' Secondary index is out of date
Global Const PXERR_SXNOTFOUND = 121 ' Secondary index was not found
Global Const PXERR_SXOPEN = 123 ' Secondary index is already open
Global Const PXERR_SXCANTUPDATE = 136 ' Can't update table open on non- 'maintained secondary
Global Const PXERR_RECTOOBIG = 125 ' Record too big for index
' record oriented errors
Global Const PXERR_RECDELETED = 50 ' Another user deleted record
Global Const PXERR_RECLOCKED = 9 ' Record is locked
Global Const PXERR_RECNOTFOUND = 89 ' Record was not found
Global Const PXERR_KEYVIOL = 97 ' Key violation
Global Const PXERR_ENDOFTABLE = 101 ' End of table
Global Const PXERR_STARTOFTABLE = 102 ' Start of table
' errors specific for Windows Engine DLL
Global Const PXERR_TOOMANYCLIENTS = 131
Global Const PXERR_EXCEEDSCONFIGLIMITS = 132
Global Const PXERR_CANTREMAPFILEHANDLE = 133
' resource errors
Global Const PXERR_OUTOFMEM = 40 ' Not enough memory to
' complete operation
Global C